home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / idcutils.zip / FLOPPY.BAT < prev    next >
DOS Batch File  |  1987-02-07  |  6KB  |  156 lines

  1. Echo Off
  2. REM
  3. REM Written by Gary Conway              Infinity Design Concepts
  4. REM
  5. REM 11/05/86
  6. REM All Infinity Design Programs can be located on the
  7. REM SoftStone RCP/M BBS, Louisville, Kentucky (502)241-4109
  8. REM
  9. REM ANSI.SYS must be installed and YESNO.COM and FORMAT.COM must
  10. REM be in your DOS path.
  11. REM
  12. REM This batch file will format floppy disks. It is a bit slow
  13. REM with screen writes (as are all batch files), but it does
  14. REM allow continuous formatting of floppy diskettes without
  15. REM continually hitting ENTER between disk swaps.
  16. REM It is best utilized on  systems with two floppy drives. 
  17. REM Both drives can be formatted continuously without operator
  18. REM intervention. This is handy when you wish to format a lot
  19. REM of diskettes and don't wish to keep answering a lot of
  20. REM repetative questions.
  21. REM The program will format drives A and B, if you desire other
  22. REM drives, then simply change this BATch file with your editor.
  23. REM Note also the different usages of YESNO.COM.
  24. REM
  25. REM NOTE: On some machines, it has been noted that when
  26. REM       formatting, the FORMAT program won't wait for a user
  27. REM       response the first time around (subsequent formats
  28. REM       proceed without any input required). If this is the
  29. REM       case on your machine, you may wish to make the 
  30. REM       statements that I have surrounded by * 's into non
  31. REM       REM statements. This will allow the user to hit
  32. REM       ENTER before the first disk is formatted, however the
  33. REM       remaining disks will be formatted automatically.
  34. Break ON
  35. Cls
  36. YESNO 13 10 27 "[35m"
  37. Echo               ┌─────────────────────────────────────────────────┐
  38. Echo               │         Infinity Design Concepts        (c) 1986│
  39. Echo               └─────────────────────────────────────────────────┘
  40. :GETANS
  41. YESNO 27 "[5;1H" 27 "[33;40m"
  42. YESNO 13 10 9 9 9 "0. Exit"
  43. YESNO 13 10 9 9 9 "1. Format Drive A......(one time)"
  44. YESNO 13 10 9 9 9 "2. Format Both A and B (one time)"
  45. YESNO 13 10 9 9 9 "3. Format Drive A......Continuously"
  46. YESNO 13 10 9 9 9 "4. Format Both A and B Continuously"
  47. YESNO Resp 13 10 9 9 9 9 "Enter Selection ==> "
  48. Rem
  49. If Errorlevel 48 Goto LowrangeOK
  50. Goto GETANS
  51. :LowrangeOK
  52. IF Errorlevel 53 Goto GETANS
  53. If Errorlevel 52 Goto BOTHM
  54. If Errorlevel 51 Goto SINGM
  55. If Errorlevel 50 Goto BOTH
  56. If Errorlevel 49 Goto SING
  57. If Errorlevel 48 Goto DONE
  58. Goto GETANS
  59. REM
  60. :SING
  61. Set RETURN=SINGLE
  62. Goto KILLLINES
  63. :SINGLE
  64. YESNO 27 "[5;1H"
  65. YESNO  13 10 10 "Formatting Drive ""A""" 
  66. YESNO 27 "[1;32m" 13 10 "│" 13 10
  67. Set MULT=NO
  68. Goto NEXT
  69. :SINGM
  70. Set MULT=YES
  71. Set RETURN=SINGLEM
  72. Goto KILLLINES
  73. :SINGLEM
  74. YESNO 27 "[5;1H"
  75. YESNO  13 10 10 "Formatting Drive ""A"" Continuously" 13 10 27 "[1;32m"
  76. YESNO "│                      Hit " 27 "[5;31m" "CTRL-BREAK" 27 "[0;1;32m" " Twice to Exit" 13 10
  77. :NEXT
  78. Echo │                    ╔════════════════════════════════════╗
  79. Echo └───────────────────»║  Insert a Blank Diskette into the  ║
  80. Echo                      ║          - A -   drive             ║
  81. Echo                      ╚════════════════════════════════════╝
  82. REM ***********************************
  83. REM ECHO           Hit any key to start
  84. REM PAUSE > NULL
  85. REM ***********************************
  86. If %MULT%==YES Goto CONT1
  87. REM format one floppy and exit
  88. YESNO 13 "N" 13 | format A:
  89. YESNO 27 "[13;1H" 27 "[K"
  90. Goto DONE
  91. REM format one floppy continuously
  92. :CONT1
  93. YESNO 27 "[14;1H" 07
  94. YESNO 13 "N" 13 | format A:
  95. YESNO 27 "[14;1H" 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10 
  96. YESNO 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10 
  97. YESNO 27 "[K" 13 10 27 "[K"
  98. Goto CONT1
  99. :BOTH
  100. Set MULT=NO
  101. Set RETURN=BOTH1
  102. Goto KILLLINES
  103. :BOTH1
  104. YESNO 13 10 10 "Formatting Drives ""A"" and ""B""" 27 "[1;32m" 13 10
  105. Goto CONT4
  106. :BOTHM
  107. Set MULT=YES
  108. Set RETURN=BOTHM1
  109. Goto KILLLINES
  110. :BOTHM1
  111. YESNO 13 10 10 "Formatting Drives ""A"" and ""B"" Continuously"
  112. YESNO 27 "[1;32m" 13 10
  113. :CONT4
  114. YESNO "│                       Hit" 27 "[5;31m" " CTRL-BREAK" 27 "[0;1;32m" " Twice to Exit" 13 10
  115. Echo │                  ╔══════════════════════════════════════╗
  116. Echo └─────────────────»║  Insert Blank Diskettes into Drives  ║
  117. Echo                    ║            A   and   B               ║
  118. Echo                    ╚══════════════════════════════════════╝
  119. REM ********************************************
  120. REM ECHO                 Hit any key to continue
  121. REM PAUSE > NULL
  122. REM ********************************************
  123. :CONT2
  124. YESNO 27 "[13;1H" 27 "[K" 13 10 27 "[K" 13 10 
  125. YESNO 27 "[K" 13 10 27 "[K" 13 10 27 "[K"
  126. YESNO 13 10 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 
  127. YESNO 13 10 27 "[K" 13 10 27 "[K" 27 "[31m"
  128. YESNO 07 27 "[13;1H" "Change Disks in B:" 13 10 27 "[32m"
  129. YESNO 13 "N" 13 | format A:
  130. YESNO 27 "[13;1H" 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10 
  131. YESNO 27 "[K"
  132. YESNO 13 10 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10 
  133. YESNO 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10 27 "[K"
  134. If %MULT%==YES Goto YESHOW
  135. :NOSHOW1
  136. YESNO 27 "[13;1H" 13 10
  137. Goto NOSHOW
  138. :YESHOW
  139. YESNO 07 27 "[31m" 27 "[13;1H" "Change Disks in A:" 13 10 27 "[32m"
  140. :NOSHOW
  141. YESNO 13 "N" 13 | format B:
  142. If %MULT%==YES Goto CONT2
  143. Goto DONE
  144. :KILLLINES
  145. YESNO 27 "[6;1H" 27 "[K" 13 10 27 "[K" 13 10 27 "[K"
  146. YESNO 13 10 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 27 "[5;1H"
  147. Goto %RETURN%
  148. :DONE
  149. YESNO 27 "[14;1H" 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10
  150. YESNO 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10
  151. YESNO 27 "[K" 13 10 27 "[K" 13 10 27 "[K" 13 10 27 "[K"
  152. cd\
  153. YESNO 27 "[14;1H" "Finished..."
  154. Set MULT=
  155. Set RETURN=
  156.